package com.hmdp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hmdp.entity.Key;
import com.hmdp.entity.patient;
import com.hmdp.mapper.KeyMapper;
import com.hmdp.mapper.PatientMapper;
import com.hmdp.service.IkeyService;
import org.springframework.stereotype.Service;


@Service
public class KeyServiceImpl extends ServiceImpl<KeyMapper, Key> implements IkeyService {

    @Override
    public void insert(Key key) {
        save(key);
    }

    //通过id查询
    @Override
    public Key queryById(Long id) {
        Key key = query().eq("patient_id", id).one();
        return key;
    }

}
